package com.whiteape.book.model.dto;

import com.whiteape.book.model.bo.BaseMediaInfoBean;
import com.whiteape.book.utils.GsonUtils;

import org.greenrobot.greendao.converter.PropertyConverter;

public class SiteSourceCategoryRuleResultBean extends BaseMediaInfoBean implements PropertyConverter<SiteSourceCategoryRuleResultBean, String> {
    //搜索结果中的，表示书籍的列表规则
    private String list;
    private String detailUrl;
    private String nextPage;
    //页码总数，如果有这个,
    private String pageTotal;

    public String getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(String pageTotal) {
        this.pageTotal = pageTotal;
    }

    public String getNextPage() {
        return nextPage;
    }

    public void setNextPage(String nextPage) {
        this.nextPage = nextPage;
    }

    public String getDetailUrl() {
        return detailUrl;
    }

    public void setDetailUrl(String detailUrl) {
        this.detailUrl = detailUrl;
    }

    public String getList() {
        return list;
    }

    public void setList(String list) {
        this.list = list;
    }

    @Override
    public SiteSourceCategoryRuleResultBean convertToEntityProperty(String databaseValue) {
        return GsonUtils.string2Obj(databaseValue, SiteSourceCategoryRuleResultBean.class);
    }

    @Override
    public String convertToDatabaseValue(SiteSourceCategoryRuleResultBean entityProperty) {
        return GsonUtils.obj2String(entityProperty);
    }

    @Override
    public String toString() {
        return "SiteSourceSearchResultBean{" +
                "list='" + list + '\'' +
                ", detailUrl='" + detailUrl + '\'' +
                '}' + super.toString();
    }
}